$(function(){
	if($("body").attr("rmenu")=="none"){
		return false;
	}
	var html='<div class="quick_links_wrap">' +
		'<div class="quick_links_panel">' +
		'<div id="quick_links" class="quick_links">' +
		'<a href="#top" class="return_top">' +
		'<i class="top"></i>' +
		'<span>返回顶部</span>' +
		'</a>' +
		'<a href="javascript:showusercenter();" class="my_qlinks">' +
		'<i class="setting"></i><span>个人中心</span>' +
		'</a>' +
		'<a href="javascript:showshopcart();" class="message_list" >' +
		'<i class="cart"></i>' +
		'<span>购物车</span>' +
		'<em class="num" id="RMcartnum"><b>0</b>' +
		'</em>' +
		'</a>' +
		'<a href="'+ctx+'/user/stationnews" target="_blank"><i class="message">' +
		'</i>' +
		'<span>站内消息</span>' +
		'<em class="num" id="RMnewsnum"><b>0</b>' +
		'</em>' +
		'</a>' +
		'<a href="'+ctx+'/order/oftenList">' +
		'<i class="view"></i>' +
		'<span>快捷下单</span>' +
		'</a>' +
        '<a onclick="NTKF.im_openInPageChat(\'kf_9798_1494052158469\')">' +
        '<i class="KFview"></i>' +
        '<span>联系客服</span>' +
        '</a>' +
		'</div>' +
		'<div class="quick_toggle">' +
		'<a href="javascript:showhideRM();" class="toggle" title="展开/收起">' +
		'</a>' +
		'</div>' +
		'</div>' +
		'<div id="quick_links_pop" class="quick_links_pop"></div>' +
		'</div>';
	$(document.body).append(html);
	$(window).scroll(function(){
		var stop=$(this).scrollTop();
		if(stop>0)$(".quick_links_panel").addClass("quick_links_allow_gotop");
		else $(".quick_links_panel").removeClass("quick_links_allow_gotop");
	})
	$w.httpRequest({
		 url:apiroot+"/user/userNoNum",
		 data:{},
		 ok:function(ret){
			 $("#RMcartnum b").text(ret.Data.cartnum);
			 $("#RMnewsnum b").text(ret.Data.newsnum);
		 }
	 })
})
function showhideRM(){
	var obj=$(".quick_links_wrap");
	if(obj.get(0).className.indexOf("quick_links_min")==-1)
		obj.addClass("quick_links_min");
	else obj.removeClass("quick_links_min");
}
/*function hideRightMenu(){
	$(".quick_links_wrap").hide();
}*/



